{
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
}
var
	a:array[1..100,1..100] of longint;
	i,j,n:integer;
	temp:longint;
begin
	read(n);
	for i:=1 to n do
	for j:=1 to n do
		read(a[i,j]);
	for i:=1 to n do
	for j:=i+1 to n do
	begin
		temp:=a[i,j];
		a[i,j]:=a[j,i];
		a[j,i]:=temp;
	end;
	for i:=1 to n do
	begin
		for j:= 1 to n do
			write(a[i,j],' ');
		writeln;
	end;
end.
